#pragma once
#include "WidgetInspectorTestWidget.h"

class WidgetInspectorTestWidgetUi {
    WidgetInspectorTestWidget *mWidget{nullptr};
private:
    QString TR(const QString &sourceText, const QString &disambiguation = "", int n = -1);
public:
    WidgetInspectorTestWidgetUi() = default;
    void SetupUI(WidgetInspectorTestWidget *widget);
    void RetranslateUI();
};

inline QString WidgetInspectorTestWidgetUi::TR(const QString &sourceText, const QString &disambiguation, int n) {
    return mWidget->tr(sourceText.toStdString().c_str(), disambiguation.toStdString().c_str(), n);
}

inline void WidgetInspectorTestWidgetUi::SetupUI(WidgetInspectorTestWidget *widget) {
    mWidget = widget;

    RetranslateUI();
}

inline void WidgetInspectorTestWidgetUi::RetranslateUI() {
    mWidget->setWindowTitle(TR("窗口部件属性查看器测试窗口"));
}
